package com.nlx.notes.module.bean.vo.gold;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.nlx.notes.module.bean.BaseVo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

@Getter
@Setter
@ToString
public class GoldOverviewVO extends BaseVo {

    /**
     * 当前黄金价格
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal currentGoldPrice = BigDecimal.ZERO;

    /**
     * 金价变化价格
     */
    private BigDecimal  currentGoldPriceChange = BigDecimal.ZERO;

    /**
     * 实施金价的变动率
     */
    private BigDecimal  currentGoldProfitRate = BigDecimal.ZERO;


    /**
     *总重量
     */
    private BigDecimal weight = BigDecimal.ZERO;

    /**
     *总价
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal totalPrice = BigDecimal.ZERO;

    /**
     *平均单价
     */
    private BigDecimal unitPrice = BigDecimal.ZERO; // 可选手动设置或自动计算

    /**
     * 持仓盈亏
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal positionProfitLoss = BigDecimal.ZERO;

    /**
     * 持仓手续费
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal positionFee = BigDecimal.ZERO;

    /**
     * 收益率
     */
    private BigDecimal yieldRate = BigDecimal.ZERO;


    /**
     * 累计盈亏
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal totalProfitLoss;

}
